package com.example.mykotilin

import android.content.Intent
import android.os.Bundle
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.example.mykotilin.databinding.ActivityMainBinding
import com.example.mykotilin.databinding.ActivitySelectBinding
import com.example.mykotilin.livedata.LiveDataActivity
import com.example.mykotilin.navigation.NavigationActivity
import com.example.mykotilin.navigation1.NavigationAdvancedActivity
import com.example.mykotilin.navigation2.DonutActivity
import com.example.mykotilin.paging.PagingActivity
import com.example.mykotilin.paging2.RedditMainActivity
import com.example.mykotilin.room.views.UserActivity
import com.example.mykotilin.room2.BusScheduleActivity
import com.example.mykotilin.viewpager2.BrowseActivity
import com.example.mykotilin.workmanager.SelectImageActivity

class MainActivity : AppCompatActivity() {


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        ActivityMainBinding.inflate(layoutInflater).run {
            setContentView(root)
            tvRoom.setOnClickListener {
                val intent = Intent()
                intent.setClass(this@MainActivity, UserActivity::class.java)
                startActivity(intent)
            }
            tvLivedata.setOnClickListener {
                val intent = Intent()
                intent.setClass(this@MainActivity, LiveDataActivity::class.java)
                startActivity(intent)
            }

            tvDatamanager.setOnClickListener {
                startActivity(Intent().setClass(this@MainActivity, SelectImageActivity::class.java))
            }
            tvRoom2.setOnClickListener {
                startActivity(Intent().setClass(this@MainActivity, BusScheduleActivity::class.java))
            }

            tvNavigation1.setOnClickListener {
                startActivity(Intent().setClass(this@MainActivity, NavigationActivity::class.java))
            }
            tvNavigation2.setOnClickListener {
                startActivity(
                    Intent().setClass(
                        this@MainActivity,
                        NavigationAdvancedActivity::class.java
                    )
                )
            }

            tvNavigation3.setOnClickListener {
                startActivity(
                    Intent().setClass(
                        this@MainActivity,
                        DonutActivity::class.java
                    )
                )
            }

            tvPaging.setOnClickListener {
                startActivity(
                    Intent().setClass(
                        this@MainActivity,
                        PagingActivity::class.java
                    )
                )
            }
            tvPaging2.setOnClickListener {
                startActivity(
                    Intent().setClass(
                        this@MainActivity,
                        RedditMainActivity::class.java
                    )
                )
            }

            tvViewpager.setOnClickListener {
                startActivity(
                    Intent().setClass(
                        this@MainActivity,
                        BrowseActivity::class.java
                    )
                )
            }
        }


    }


    override fun onStart() {
        super.onStart()


    }
}